//
//  ViewController.m
//  侧滑导致的App假死
//
//  Created by chenleping on 2019/3/12.
//  Copyright © 2019年 DSY. All rights reserved.
//

#import "ViewController.h"

#import "NextViewController.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    self.view.backgroundColor = [UIColor yellowColor];
    
    UIButton * btn = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.view addSubview:btn];
    btn.backgroundColor = [UIColor redColor];
    btn.frame = CGRectMake(0, 100, 100, 100);
    [btn addTarget:self action:@selector(clickBtn) forControlEvents:UIControlEventTouchUpInside];
}
- (void)viewDidAppear:(BOOL)animated{
    [super viewDidAppear:animated];
    
}
- (void)clickBtn{
    NSLog(@"跳转到下一个页面...");
    NextViewController * nextVC = [NextViewController new];
    [self.navigationController pushViewController:nextVC animated:YES];
}



@end
